#include<iostream>
#include<vector>
using namespace std;
 class Solution {
public:
    string bestHand(vector<int>& ranks, vector<char>& suits) {
        int rank[14]={0},suit[4]={0};
        int flag=0;
        for(auto c:suits)
        {
            suit[c-'a']++;
            if(suit[c-'a']==5)return "Flush";
        }
        for(auto c:ranks)
        {
            rank[c]++;
            if(rank[c]==3)return "Three of a Kind";
            if(rank[c]==2)flag=1;
        }
        return flag==1?"Pair":"High Card";

    }
};